package com.example.controller;

import com.hh.entity.Users;
import com.hh.service.UsersService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController //符合注解包括了@ResponseBody
public class UsersController {

    @DubboReference(interfaceClass = UsersService.class,version="1.0")
    UsersService usersService;

    @GetMapping(value="getInfo")
    public String getUsers(String id){
        Users users=usersService.getUsers(id);
        return users.toString();
    }
}
